-
Notifications
You must be signed in to change notification settings - Fork 9
Low-provenance Expr->SyntaxTree conversion
#22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
63aa9b2 to
3514388
Compare
b678eef to
7cf9664
Compare
f5da731 to
a3b60ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. There's a few things which can be refined (such as replacing @assert with something more graceful) but those can be done later.
One thing I noticed is that we need special provenance rules for Expr(:function) - the first LineNumberNode in the body block is the location where the function was defined. So function foo() end has provenance even though there's no place in the :function Expr for the line number. This is how Base.functionloc() works.
Also, could do with some light tests that basic line number provenance is working.
Avoid overlap with bitwise NOT
Co-authored-by: Claire Foster <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, I think this is good to go :)
The main part of #17:
TODO: This will need updates whenever we start using the latest dev version of JuliaSyntax